<?php
	class IndexAction extends Common {
		function index(){
			//默认Face
			$defaultFace="/dede/member/templets/images/dfboy.png"; 
			
			//全站动态
			$_member_feedDB=D("member_feed");
			$pages=new Page($_member_feedDB->total(0),25);
			$data=$_member_feedDB->limit($pages->limit)->select(0);
			foreach($data as &$record) {
				$t=$this->_memberDB->find($record["mid"]);
				$record["OwnerAvatar"]=$t["face"];//优化：一次性select25条记录的face
				if(!$record["OwnerAvatar"]){
					$record["OwnerAvatar"]=$defaultFace;
				}
				$record["OwenerUserid"]=$record["userid"];
				$record["title"]=htmlspecialchars_decode($record["title"],ENT_QUOTES);
			}
			$this->assign_by_ref('iAllStatus',$data);
			$this->assign_by_ref('iStatusIndex',$pages->fpage());
			$this->display();
		}		
	}
